Ext.define('CS.controller.PageController', {

	mainPanel: undefined,

	eventItems: undefined,

	constructor: function(config) {
		CS.apply(this, config);
	},

	bind: function() {
		CS.mainPanel = this.mainPanel;

		Ext.each(this.eventItems, function(item) {
			var arr = CS.find(item.query);

			Ext.each(arr, function(one) {
				CS.bind(one, item.event, item.fn);
			});
		});
	}

});
